tools/xl: Fix segfaults from `xl psr-cat-cbm-set` command line handling
The socket option takes a mandatory argument. Mark it as such, so
optarg isn't NULL when passed to trim(), which unconditionally
dereference it.
Range check optind against argc before blindly assuming that
argv[optind] and argv[optind+1] exist.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Chao Peng <chao.p.peng@linux.intel.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>